<?php
/**
 * <https://y.st./>
 * Copyright © 2018 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Logarithms',
	'<{subtitle}>' => 'Written in <span title="College Algebra">MATH 1201</span> by <a href="https://y.st./">Alex Yst</a>, finalised on 2018-03-07',
	'<{copyright year}>' => '2018',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<section id="problem0">
	<h2>Problem 0</h2>
	<p>
		Since we&apos;re working with exponents, it&apos;s only natural to assume we&apos;re going to need to work with logarithms to undo them and find the answer to this problem.
		However, the term with the exponent doesn&apos;t include our unknown variable.
		We won&apos;t need logarithms for our solution.
	</p>
	<p>
		The problem states that interest is compounded annually, so we can use a simplified version of the interest formula.
		The interest formula is:
	</p>
	<p>
		A(t) = P * (1 + r ÷ n)<sup>n * t</sup>
	</p>
	<p>
		At one period per year though, we can ignore n.
		This can be shown by substituting n for 1 and reducing:
	</p>
	<p>
		A(t) = P * (1 + r ÷ 1)<sup>1 * t</sup><br/>
		A(t) = P * (1 + r)<sup>t</sup>
	</p>
	<p>
		This reduced version is our simplified interest formula (not to be confused with the &quot;simple interest formula&quot;, which doesn&apos;t account for compound interest).
		From the problem, we know:
	</p>
	<p>
		x * 1.08<sup>10</sup> = 20000
	</p>
	<p>
		All we need to do is solve for x, which we can do by moving all the terms over to the other side of the equation.
		Only one term needs to be moved: the one x is multiplied by.
		We do this by dividing:
	</p>
	<p>
		x = 20000 ÷ 1.08<sup>10</sup>
	</p>
	<p>
		Solving this, we see it should take proximately 9263.86976169 dollars.
		We can&apos;t invest partial cents though.
		Rounding normally, we see we&apos;d round up, but it&apos;s important to note that if we want to see the full amount of money we seek, we must <strong>*always*</strong> round up our investment, even if it looks like we should round down.
		To double check our work, let&apos;s try plugging both 9263.86 and 9263.87 into the initial equation.
		The former should fall short, while the latter should go over.
	</p>
	<p>
		9263.86 * 1.08<sup>10</sup> ≈ 19999.9789252<br/>
		9263.87 * 1.08<sup>10</sup> ≈ 20000.0005145
	</p>
	<p>
		<strong>To have \$20000 after ten years with an interest rate of 8% per year, we need to invest \$9263.87.</strong>
		If we invest even a penny less, we fall three cents short.
		(It looks like two cents when we round, but let&apos;s be honest: the bank isn&apos;t going to round that up and give us that partial cent.
		We always have to round down what we get back.
		Round up what you put in, round down what you get back.
		Always.)
	</p>
</section>
<section id="problem1">
	<h2>Problem 1</h2>
	<p>
		The problem states that we&apos;re to find Log [(AB)÷(CD)], but doesn&apos;t give us a base to work with.
		The textbook says to assume the base is ten.
		That means we need to solve for this:
	</p>
	<p>
		log<sub>10</sub>((AB)÷(CD))
	</p>
	<p>
		We&apos;re going to need to separate AB from CD before we can break the terms up even smaller.
		The quotient rule tells us that we can break these up into separate logarithmic expressions by subtracting the two.
		That leaves us with:
	</p>
	<p>
		log<sub>10</sub>(AB) - log<sub>10</sub>(CD)
	</p>
	<p>
		From there, we apply the product rule, but we must be careful to insert parentheses to preserve the computation order.
		That leaves us with this, or final answer:
	</p>
	<p>
		<strong>(log<sub>10</sub>(A) + log<sub>10</sub>(B)) - (log<sub>10</sub>(C) + log<sub>10</sub>(D))</strong>
	</p>
</section>
<section id="problem2">
	<h2>Problem 2</h2>
	<p>
		The book gives us the formula for radioactive decay:
	</p>
	<p>
		A(t) = A<sub>0</sub>e<sup>kt</sup>
	</p>
	<p>
		First, we&apos;ve got to solve for k.
		We know carbon 14 has a half life of 5730 years, so let&apos;s plug that in and solve for k.
	</p>
	<p>
		A<sub>0</sub> ÷ 2 = A<sub>0</sub>e<sup>5730k</sup><br/>
		½ = e<sup>5730k</sup><br/>
		ln(½) = 5730k<br/>
		ln(½) ÷ 5730 = k<br/>
	</p>
	<p>
		We could aproximate that value with a calculator, but for now, let&apos;s not.
		Let&apos;s just use ln(½) ÷ 5730 as our constant k.
		As a side note, we didn&apos;t even need to do anything with our 5730 value as we solved.
		We could use that as a constant in a new equation for finding k given a half-life:
	</p>
	<p>
		ln(½) ÷ h = k, where h is the half-life of a given element
	</p>
	<p>
		Substituting that in for k, we basically have an equation for radioactive decay that doesn&apos;t involve the constant k at all, using the half-life of the element in its place, which is exactly what we need:
	</p>
	<p>
		A(t) = A<sub>0</sub>e<sup>ln(½) ÷ h * t</sup>
	</p>
	<p>
		Let&apos;s plug in our numbers and solve for t:
	</p>
	<p>
		A<sub>0</sub> ÷ 5 = A<sub>0</sub>e<sup>ln(½) ÷ 5730 * t</sup><br/>
		1 ÷ 5 = e<sup>ln(½) ÷ 5730 * t</sup><br/>
		0.2 = e<sup>ln(½) ÷ 5730 * t</sup><br/>
		ln(0.2) = ln(½) ÷ 5730 * t<br/>
		ln(0.2) ÷ (ln(½) ÷ 5730) = t<br/>
		ln(0.2) ÷ ln(½) * 5730 = t
	</p>
	<p>
		There&apos;s probably a way to combine the two natural log terms, but the book only tells us how to add and subtract such terms, not divide them.
		Again though, we never altered the 5730 term, meaning we have yet another equation:
	</p>
	<p>
		ln(p) ÷ ln(½) * h = t, where p is the remaining amount of the radioactive element and h is the half-life of that element and h is the half life of the element
	</p>
	<p>
		In any case, we have the term t alone and everything on the other side is pluggable into a calculator.
		<strong>That means the precise time needed for only 20% of the carbon 14 to remain (our exact-answer solution) is ln(0.2) ÷ ln(½) * 5730 years.</strong>
		However, that&apos;s not very interesting because it&apos;s not very understandable.
		We can approximate a solution using a calculator.
		A calculator tells us that <strong>this will take approximately 13304.6479837 years.</strong>
		This answer makes sense, as we&apos;d expect 25% to remain after two half-lives (11460 years) and 12.5% to remain after three half-lives (17190 years).
		13304.6479837 years is between these and closer to the two half-lives time span, and 20% is between 25% and 12.5%, closer to 25%.
	</p>
</section>
END
);
